package com.zhongkun.datahome.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhongkun.datahome.service.domain.MiniProgramNodeSetting;
import com.zhongkun.datahome.service.req.cmd.system.MiniProgramNodeSettingCmd;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: MinKun
 * @Date: Created in 2025/5/8
 * @Description:
 */
public interface MiniProgramNodeSettingMapper extends BaseMapper<MiniProgramNodeSetting> {

    @Select("select max(sort) from mini_program_node_setting where del_flag = 0")
    Integer selectMaxSort();

    @Select("select * from mini_program_node_setting where del_flag = 0 order by sort asc")
    List<MiniProgramNodeSettingCmd> queryNodeList();

    @Delete("delete from mini_program_node_setting")
    int deleteAllNode();
}
